class RedheadDuck extends Duck {

    public RedheadDuck(String color, double heavy) {
        super(color, heavy);
    }

    // 重写fly方法
    @Override
    public void fly() {
        System.out.println("红头鸭振翅飞行");
    }

    // 重写quack方法
    @Override
    public void quack() {
        System.out.println("红头鸭嘎嘎声");
    }

    // 重载setHeavy方法 - 添加单位转换
    public void setHeavy(double heavy, String unit) {
        if ("pound".equalsIgnoreCase(unit)) {
            this.heavy = heavy * 0.453592; // 磅转换为千克
            System.out.println("红头鸭重量设置为: " + heavy + "磅 (" + this.heavy + "kg)");
        } else {
            setHeavy(heavy);
        }
    }
}